package com.xingxuecn.demos.service;

import com.xingxuecn.demos.domain.RoleUser;
import com.xingxuecn.demos.mapper.RoleUserMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Kris at 2018/9/27 9:39
 */
@Service
public class RoleUserServiceImpl implements RoleUserService{

    @Autowired
    RoleUserMapper roleUserMapper;

    public boolean defaultRoleForUser(Integer user_id){
        RoleUser roleUser = new RoleUser();
        roleUser.setUserId(user_id);
        roleUser.setRoleId(6);
        roleUserMapper.insert(roleUser);
        return true;
    }
}
